//#############################################################################
//
// FILE:   traj.c
//
// TITLE:  C28x InstaSPIN trajectory library (floating point)
//
//#############################################################################

#include "traj.h"


//*****************************************************************************
//
// TRAJ_init
//
//*****************************************************************************
TRAJ_Handle
TRAJ_init(void *pMemory, const size_t numBytes)
{
    TRAJ_Handle handle;

    if((int16_t)numBytes < (int16_t)sizeof(TRAJ_Obj))
    {
        /*LDRA_INSPECTED 95 S MR12 11.3 "Below typecasting to NULL has no
        issues"*/
        return((TRAJ_Handle)NULL);
    }

    //
    // Assign the handle
    //
    /*LDRA_INSPECTED 94 S MR12 11.3 "Below typecasting to void * has no
    issues"*/
    /*LDRA_INSPECTED 95 S MR12 11.3 "Below typecasting to void * no issues"*/
    handle = (TRAJ_Handle)pMemory;

    /*LDRA_INSPECTED 71 S MR12 11.3 "Always, address of a static object is
    passed, so ok for wider scope"*/
    return(handle);
} // end of TRAJ_init() function

// end of file
